package com.supplychain.scm.core.common.validator.phone;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author liyang
 * @version 1.0.0
 * @ClassName Phone
 * @Description 手机号参数校验注解
 * @createTime 11:25:00 2022/04/09
 */
@Documented
@Constraint(
        validatedBy = {PhoneValidationImpl.class}
)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface Phone {

    boolean required() default false;

    String message() default "手机号码格式错误";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };
}
